A thermal flowmeter that measures a flow rate of a gas includes a flow detection unit configured to measure the flow rate and is configured to measure the flow rate of the gas by performing heat transfer between the flow detection unit and the gas to be measured. In the thermal flowmeter, a sub-passage structure such as centrifugal separation by a cyclone bypass, inertial separation by a branch passage, or the like is adopted from the viewpoint of a contamination measure. For example, PTL 1 discloses a structure of a thermal flow measurement device having a drain hole.